public class Rectangle {
	double width;
	double height;
	
	Rectangle(Point p1, Point p2) {
		width = Math.abs((p2.x - p1.x));
		height = Math.abs((p2.y - p1.y));
	}
	
	public Double getArea() {
		return width * height;
	}
	
	public Double getDiagonal() {
		return Math.sqrt( Math.pow(width, 2) + Math.pow(height, 2) );
	}
}
